<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
    <META http-equiv=Content-Type content="text/html; charset=gb2312">
    <link rel="stylesheet" href="/sys/resources/css/reset.css" type="text/css" media="screen"/>
    <link rel="stylesheet" href="/sys/resources/css/style.css" type="text/css" media="screen"/>
    <link rel="stylesheet" href="/sys/resources/css/invalid.css" type="text/css" media="screen"/>
    <script type="text/javascript" src="/sys/resources/scripts/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="/sys/resources/scripts/simpla.jquery.configuration.js"></script>
    <script type="text/javascript" src="/sys/resources/scripts/facebox.js"></script>
    <title>设置要通知的人</title>
</HEAD>
<BODY class="mian_bg">
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
    <TR height=28>
        <TD class="addr_td">&nbsp;&nbsp;<img src="/sys/resources/images/addr_icon.png">&nbsp;当前位置: 通知管理 > 设置要通知的人</TD>
    </TR>
    <TR>
        <TD bgColor=#7ca600 height=1></TD>
    </TR>
    <TR>
        <TD bgColor=#8ebe00 height=1></TD>
    </TR>
</TABLE>
<div id="main-content">
    <div class="content-box">
        <!-- Start Content Box -->
        <div class="content-box-header">
            <h3>设置要通知的人</h3>

            <div class="clear"></div>
        </div>
        <div class="content-box-content">
            <div class="tab-content default-tab" id="tab1" style="display: block;">
                <form action="/sys/inform/editInforms.do" method="post" id="form" name="form" onsubmit="deal3();">
                    <table>
                        <tbody>
                        <tr>
                            <td colspan="3"><a href="/sys/inform/index.do">【返回列表】</a></td>
                        </tr>
                        <tr>
                            <td>通知人设置</td>
                            <td colspan="2">
                                如果要指定当前党员阶段下的用户，可选中该用户 <br>
                            </td>
                        </tr>

                        <tr>
                            <td>党员流程</td>
                            <td>操作</td>
                        </tr>

                        <tr>
                            <th width="180">
                                <input id="1" type="checkbox" onclick="deal(this.id);">入党积极分子培养
                            </th>
                            <td colspan="2"></td>
                        </tr>
                        <tr class="nav_4">
                            <th width="180"></th>
                            <td class="1">
                                <c:forEach var="item" items="${listOne}">
                                    <input id="user_${item.uid}" type="checkbox" name="userid" value="${item.uid}">${item.realname}
                                </c:forEach>

                            </td>
                        </tr>


                        <tr>
                            <th width="180">
                                <input id="2" type="checkbox" onclick="deal(this.id);">确定发展对象
                            </th>
                            <td colspan="2"></td>
                        </tr>
                        <tr class="nav_4">
                            <th width="180"></th>
                            <td class="2">
                                <c:forEach var="item" items="${listTwo}">
                                    <input id="user_${item.uid}" type="checkbox" name="userid" value="${item.uid}">${item.realname}
                                </c:forEach>
                            </td>
                        </tr>


                        <tr>
                            <th width="180">
                                <input id="3" type="checkbox" onclick="deal(this.id);">接收预备党员
                            </th>
                            <td colspan="2"></td>
                        </tr>
                        <tr class="nav_4">
                            <th width="180"></th>
                            <td class="3">
                                <c:forEach var="item" items="${listThree}">
                                    <input id="user_${item.uid}" type="checkbox" name="userid" value="${item.uid}">${item.realname}
                                </c:forEach>
                            </td>
                        </tr>


                        <tr>
                            <th width="180">
                                <input id="4" type="checkbox" onclick="deal(this.id);">预备党员考察
                            </th>
                            <td colspan="2"></td>
                        </tr>
                        <tr class="nav_4">
                            <th width="180"></th>
                            <td class="4">
                                <c:forEach var="item" items="${listFour}">
                                    <input id="user_${item.uid}" type="checkbox" name="userid" value="${item.uid}">${item.realname}
                                </c:forEach>
                            </td>
                        </tr>


                        <tr>
                            <th width="180">
                                <input id="5" type="checkbox"  onclick="deal(this.id);">预备党员转正
                            </th>
                            <td colspan="2"></td>
                        </tr>
                        <tr class="nav_4">
                            <th width="180"></th>
                            <td class="5">
                                <c:forEach var="item" items="${listFive}">
                                    <input id="user_${item.uid}" type="checkbox" name="userid" value="${item.uid}">${item.realname}
                                </c:forEach>
                            </td>
                        </tr>

                        <tr>
                            <td colspan="3">
                                <input class="button" type="submit" value=" 提交 ">
                                <input type="hidden" id="noticeid" name="noticeid" value="${id}"/>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </form>
            </div>
            <!-- End #tab1 -->
        </div>
        <!-- End .content-box-content -->
    </div>
    <!-- End .content-box -->
</div>
<c:if test="${not empty msg}">
    <script type="text/javascript">
        alert("${msg}");
        window.location.href="/sys/inform/index.do";
    </script>
</c:if>

<script type="text/javascript">
    function deal(className) {
        if ($("#" + className).attr("checked") == true) {
//            $("." + className).find("input").attr('disabled', "true");
            $("." + className).find("input").attr('checked', "checked");
        } else {
//            $("." + className).find("input").removeAttr('disabled'); //取消锁定
            $("." + className).find("input").removeAttr("checked");//取消全选
        }
    }

    <c:forEach var="item" items="${noticeRelation}">
        $("#user_" +${item.uid}).attr('checked', "checked");
    </c:forEach>
</script>
</BODY>
</HTML>